﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ChatSample.Models
{
    public  class ChatList
    {
        static Dictionary<string, string> Dic = new Dictionary<string, string>();

        public static void Add(string name,string connectionId)
        {
            if (Dic.ContainsKey(name))
            {
                Dic[name] = connectionId;
            }
            else
            {
                Dic.Add(name, connectionId);
            }
        }
        public static string GetConnectionId(string name)
        {
            if (Dic.ContainsKey(name))
            {
                return Dic[name];
            }
            else
            {
                return null;
            }
        }

    }
}
